package com.spark.invoicings.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.math.BigDecimal;
import java.io.Serializable;
import java.util.List;

import lombok.Data;

/**
 * 销售订单明细表
 * 
 * @author sunyan
 * @email sunyan@gmail.com
 * @date 2024-06-13 11:15:03
 */
@Data
@TableName("t_order_detail")
public class OrderDetail implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * 订单明细id
	 */
	@TableId(type = IdType.AUTO)
	private Integer orderDetailId;
	/**
	 * 所属销售订单id
	 */
	private Integer salesOrderId;
	/**
	 * 商品id
	 */
	private Integer productId;
	/**
	 * 下单数量
	 */
	private Integer quantityOrdered;
	/**
	 * 折后单价
	 */
	private double discountedPrice;
	/**
	 * 金额小计
	 */
	private double subtotalAmount;
	/**
	 * 备注
	 */
	private String notes;
	/**
	 * 成本单价
	 */
	private double costPrice;
	/**
	 * 商品成本
	 */
	private double productCost;
	/**
	 * 实际销售数量
	 */
	private Integer actualSalesQuantity;
	/**
	 * 退货数量
	 */
	private Integer returnQuantity;
	/**
	 * 待申请发货数量
	 */
	private Integer pendingShipmentQuantity;
	/**
	 * 已发货数量
	 */
	private Integer shippedQuantity;
	/**
	 * 已签收数量
	 */
	private Integer receivedQuantity;
	/**
	 * 待签收数量
	 */
	private Integer pendingReceiptQuantity;
	/**
	 * 已退货数量
	 */
	private Integer returnedQuantity;
	/**
	 * 待收金额
	 */
	private double pendingPaymentAmount;

	/**
	 * 出库单明细表关联对象
	 *
	 * */
	@TableField(exist = false)
	private List<OutboundDetail> outboundDetails;
	@TableField(exist = false)
    private Product products;
	@TableField(exist = false)
	private SalesOrder salesOrder;
	@TableField(exist = false)
	private SaleCustomer customer;

	public Integer getOrderDetailId() {
		return orderDetailId;
	}

	public void setOrderDetailId(Integer orderDetailId) {
		this.orderDetailId = orderDetailId;
	}

	public Integer getSalesOrderId() {
		return salesOrderId;
	}

	public void setSalesOrderId(Integer salesOrderId) {
		this.salesOrderId = salesOrderId;
	}

	public Integer getProductId() {
		return productId;
	}

	public void setProductId(Integer productId) {
		this.productId = productId;
	}

	public Integer getQuantityOrdered() {
		return quantityOrdered;
	}

	public void setQuantityOrdered(Integer quantityOrdered) {
		this.quantityOrdered = quantityOrdered;
	}

	public double getDiscountedPrice() {
		return discountedPrice;
	}

	public void setDiscountedPrice(double discountedPrice) {
		this.discountedPrice = discountedPrice;
	}

	public double getSubtotalAmount() {
		return subtotalAmount;
	}

	public void setSubtotalAmount(double subtotalAmount) {
		this.subtotalAmount = subtotalAmount;
	}

	public String getNotes() {
		return notes;
	}

	public void setNotes(String notes) {
		this.notes = notes;
	}

	public double getCostPrice() {
		return costPrice;
	}

	public void setCostPrice(double costPrice) {
		this.costPrice = costPrice;
	}

	public double getProductCost() {
		return productCost;
	}

	public void setProductCost(double productCost) {
		this.productCost = productCost;
	}

	public Integer getActualSalesQuantity() {
		return actualSalesQuantity;
	}

	public void setActualSalesQuantity(Integer actualSalesQuantity) {
		this.actualSalesQuantity = actualSalesQuantity;
	}

	public Integer getReturnQuantity() {
		return returnQuantity;
	}

	public void setReturnQuantity(Integer returnQuantity) {
		this.returnQuantity = returnQuantity;
	}

	public Integer getPendingShipmentQuantity() {
		return pendingShipmentQuantity;
	}

	public void setPendingShipmentQuantity(Integer pendingShipmentQuantity) {
		this.pendingShipmentQuantity = pendingShipmentQuantity;
	}

	public Integer getShippedQuantity() {
		return shippedQuantity;
	}

	public void setShippedQuantity(Integer shippedQuantity) {
		this.shippedQuantity = shippedQuantity;
	}

	public Integer getReceivedQuantity() {
		return receivedQuantity;
	}

	public void setReceivedQuantity(Integer receivedQuantity) {
		this.receivedQuantity = receivedQuantity;
	}

	public Integer getPendingReceiptQuantity() {
		return pendingReceiptQuantity;
	}

	public void setPendingReceiptQuantity(Integer pendingReceiptQuantity) {
		this.pendingReceiptQuantity = pendingReceiptQuantity;
	}

	public Integer getReturnedQuantity() {
		return returnedQuantity;
	}

	public void setReturnedQuantity(Integer returnedQuantity) {
		this.returnedQuantity = returnedQuantity;
	}

	public double getPendingPaymentAmount() {
		return pendingPaymentAmount;
	}

	public void setPendingPaymentAmount(double pendingPaymentAmount) {
		this.pendingPaymentAmount = pendingPaymentAmount;
	}

	public List<OutboundDetail> getOutboundDetails() {
		return outboundDetails;
	}

	public void setOutboundDetails(List<OutboundDetail> outboundDetails) {
		this.outboundDetails = outboundDetails;
	}

	public Product getProducts() {
		return products;
	}

	public void setProducts(Product products) {
		this.products = products;
	}

	public SalesOrder getSalesOrder() {
		return salesOrder;
	}

	public void setSalesOrder(SalesOrder salesOrder) {
		this.salesOrder = salesOrder;
	}

	public SaleCustomer getCustomer() {
		return customer;
	}

	public void setCustomer(SaleCustomer customer) {
		this.customer = customer;
	}
}
